package net.sshiffon;

import org.apache.log4j.Logger;

import com.jcraft.jsch.SftpProgressMonitor;

/**
 *
 * @author amir
 */
public class SftpProgress implements SftpProgressMonitor {
    Logger logger = Logger.getLogger(SftpProgress.class);
    String src;
    int op;
    String dest;
    long max;
    long current;
    public SftpProgress()
    {
    }

    public void init(int op, String src, String dest, long max) {
        this.op= op;
        this.src = src;
        this.dest= dest;
        this.max= max;
        logger.info("Start transferring "+src+" to "+dest+", "+max+" bytes\n");
    }

    public boolean count(long count) {
        logger.info("Transfer currently "+count+"/"+max+" bytes\n");
        return true;
    }

    public void end() {
        logger.info("Finished transferring "+src+" to "+dest+", "+max+" bytes\n");
        
    }

}
